\(\int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx\) [21]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 38, antiderivative size = 140 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=\frac {c^2 \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{15 a f \sqrt {c-c \sin (e+f x)}}+\frac {2 c \cos (e+f x) (a+a \sin (e+f x))^{7/2} \sqrt {c-c \sin (e+f x)}}{15 a f}+\frac {\cos (e+f x) (a+a \sin (e+f x))^{7/2} (c-c \sin (e+f x))^{3/2}}{6 a f} \]

[Out]

1/6*cos(f*x+e)*(a+a*sin(f*x+e))^(7/2)*(c-c*sin(f*x+e))^(3/2)/a/f+1/15*c^2*cos(f*x+e)*(a+a*sin(f*x+e))^(7/2)/a/
f/(c-c*sin(f*x+e))^(1/2)+2/15*c*cos(f*x+e)*(a+a*sin(f*x+e))^(7/2)*(c-c*sin(f*x+e))^(1/2)/a/f

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {2920, 2819, 2817} \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=\frac {c^2 \cos (e+f x) (a \sin (e+f x)+a)^{7/2}}{15 a f \sqrt {c-c \sin (e+f x)}}+\frac {\cos (e+f x) (a \sin (e+f x)+a)^{7/2} (c-c \sin (e+f x))^{3/2}}{6 a f}+\frac {2 c \cos (e+f x) (a \sin (e+f x)+a)^{7/2} \sqrt {c-c \sin (e+f x)}}{15 a f} \]

[In]

Int[Cos[e + f*x]^2*(a + a*Sin[e + f*x])^(5/2)*(c - c*Sin[e + f*x])^(3/2),x]

[Out]

(c^2*Cos[e + f*x]*(a + a*Sin[e + f*x])^(7/2))/(15*a*f*Sqrt[c - c*Sin[e + f*x]]) + (2*c*Cos[e + f*x]*(a + a*Sin
[e + f*x])^(7/2)*Sqrt[c - c*Sin[e + f*x]])/(15*a*f) + (Cos[e + f*x]*(a + a*Sin[e + f*x])^(7/2)*(c - c*Sin[e +
f*x])^(3/2))/(6*a*f)

Rule 2817

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[
-2*b*Cos[e + f*x]*((c + d*Sin[e + f*x])^n/(f*(2*n + 1)*Sqrt[a + b*Sin[e + f*x]])), x] /; FreeQ[{a, b, c, d, e,
 f, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[n, -2^(-1)]

Rule 2819

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp
[(-b)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f*x])^n/(f*(m + n))), x] + Dist[a*((2*m - 1)/(
m + n)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
 EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[m - 1/2, 0] &&  !LtQ[n, -1] &&  !(IGtQ[n - 1/2, 0] && LtQ[n, m
]) &&  !(ILtQ[m + n, 0] && GtQ[2*m + n + 1, 0])

Rule 2920

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*
(x_)])^(n_.), x_Symbol] :> Dist[1/(a^(p/2)*c^(p/2)), Int[(a + b*Sin[e + f*x])^(m + p/2)*(c + d*Sin[e + f*x])^(
n + p/2), x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[p
/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\int (a+a \sin (e+f x))^{7/2} (c-c \sin (e+f x))^{5/2} \, dx}{a c} \\ & = \frac {\cos (e+f x) (a+a \sin (e+f x))^{7/2} (c-c \sin (e+f x))^{3/2}}{6 a f}+\frac {2 \int (a+a \sin (e+f x))^{7/2} (c-c \sin (e+f x))^{3/2} \, dx}{3 a} \\ & = \frac {2 c \cos (e+f x) (a+a \sin (e+f x))^{7/2} \sqrt {c-c \sin (e+f x)}}{15 a f}+\frac {\cos (e+f x) (a+a \sin (e+f x))^{7/2} (c-c \sin (e+f x))^{3/2}}{6 a f}+\frac {(4 c) \int (a+a \sin (e+f x))^{7/2} \sqrt {c-c \sin (e+f x)} \, dx}{15 a} \\ & = \frac {c^2 \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{15 a f \sqrt {c-c \sin (e+f x)}}+\frac {2 c \cos (e+f x) (a+a \sin (e+f x))^{7/2} \sqrt {c-c \sin (e+f x)}}{15 a f}+\frac {\cos (e+f x) (a+a \sin (e+f x))^{7/2} (c-c \sin (e+f x))^{3/2}}{6 a f} \\ \end{align*}

Mathematica [A] (verified)

Time = 7.71 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.09 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=-\frac {c (-1+\sin (e+f x)) (a (1+\sin (e+f x)))^{5/2} \sqrt {c-c \sin (e+f x)} (-75 \cos (2 (e+f x))-30 \cos (4 (e+f x))-5 \cos (6 (e+f x))+600 \sin (e+f x)+100 \sin (3 (e+f x))+12 \sin (5 (e+f x)))}{960 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^5} \]

[In]

Integrate[Cos[e + f*x]^2*(a + a*Sin[e + f*x])^(5/2)*(c - c*Sin[e + f*x])^(3/2),x]

[Out]

-1/960*(c*(-1 + Sin[e + f*x])*(a*(1 + Sin[e + f*x]))^(5/2)*Sqrt[c - c*Sin[e + f*x]]*(-75*Cos[2*(e + f*x)] - 30
*Cos[4*(e + f*x)] - 5*Cos[6*(e + f*x)] + 600*Sin[e + f*x] + 100*Sin[3*(e + f*x)] + 12*Sin[5*(e + f*x)]))/(f*(C
os[(e + f*x)/2] - Sin[(e + f*x)/2])^3*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^5)

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.66

method result size
default \(\frac {\sqrt {-c \left (\sin \left (f x +e \right )-1\right )}\, \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, c \,a^{2} \left (-5 \left (\cos ^{5}\left (f x +e \right )\right )+6 \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right )+8 \cos \left (f x +e \right ) \sin \left (f x +e \right )+16 \tan \left (f x +e \right )+5 \sec \left (f x +e \right )\right )}{30 f}\) \(92\)

[In]

int(cos(f*x+e)^2*(a+a*sin(f*x+e))^(5/2)*(c-c*sin(f*x+e))^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/30/f*(-c*(sin(f*x+e)-1))^(1/2)*(a*(1+sin(f*x+e)))^(1/2)*c*a^2*(-5*cos(f*x+e)^5+6*cos(f*x+e)^3*sin(f*x+e)+8*c
os(f*x+e)*sin(f*x+e)+16*tan(f*x+e)+5*sec(f*x+e))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.73 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=-\frac {{\left (5 \, a^{2} c \cos \left (f x + e\right )^{6} - 5 \, a^{2} c - 2 \, {\left (3 \, a^{2} c \cos \left (f x + e\right )^{4} + 4 \, a^{2} c \cos \left (f x + e\right )^{2} + 8 \, a^{2} c\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c}}{30 \, f \cos \left (f x + e\right )} \]

[In]

integrate(cos(f*x+e)^2*(a+a*sin(f*x+e))^(5/2)*(c-c*sin(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

-1/30*(5*a^2*c*cos(f*x + e)^6 - 5*a^2*c - 2*(3*a^2*c*cos(f*x + e)^4 + 4*a^2*c*cos(f*x + e)^2 + 8*a^2*c)*sin(f*
x + e))*sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)/(f*cos(f*x + e))

Sympy [F(-1)]

Timed out. \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=\text {Timed out} \]

[In]

integrate(cos(f*x+e)**2*(a+a*sin(f*x+e))**(5/2)*(c-c*sin(f*x+e))**(3/2),x)

[Out]

Timed out

Maxima [F]

\[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{\frac {5}{2}} {\left (-c \sin \left (f x + e\right ) + c\right )}^{\frac {3}{2}} \cos \left (f x + e\right )^{2} \,d x } \]

[In]

integrate(cos(f*x+e)^2*(a+a*sin(f*x+e))^(5/2)*(c-c*sin(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e) + a)^(5/2)*(-c*sin(f*x + e) + c)^(3/2)*cos(f*x + e)^2, x)

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.40 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=-\frac {16 \, {\left (10 \, a^{2} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{12} - 36 \, a^{2} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} + 45 \, a^{2} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 20 \, a^{2} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6}\right )} \sqrt {a} \sqrt {c}}{15 \, f} \]

[In]

integrate(cos(f*x+e)^2*(a+a*sin(f*x+e))^(5/2)*(c-c*sin(f*x+e))^(3/2),x, algorithm="giac")

[Out]

-16/15*(10*a^2*c*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(-1/4*pi + 1/2*f*x
 + 1/2*e)^12 - 36*a^2*c*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(-1/4*pi +
1/2*f*x + 1/2*e)^10 + 45*a^2*c*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(-1/
4*pi + 1/2*f*x + 1/2*e)^8 - 20*a^2*c*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*s
in(-1/4*pi + 1/2*f*x + 1/2*e)^6)*sqrt(a)*sqrt(c)/f

Mupad [B] (verification not implemented)

Time = 12.40 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.87 \[ \int \cos ^2(e+f x) (a+a \sin (e+f x))^{5/2} (c-c \sin (e+f x))^{3/2} \, dx=-\frac {a^2\,c\,\sqrt {a\,\left (\sin \left (e+f\,x\right )+1\right )}\,\sqrt {-c\,\left (\sin \left (e+f\,x\right )-1\right )}\,\left (75\,\cos \left (e+f\,x\right )+105\,\cos \left (3\,e+3\,f\,x\right )+35\,\cos \left (5\,e+5\,f\,x\right )+5\,\cos \left (7\,e+7\,f\,x\right )-700\,\sin \left (2\,e+2\,f\,x\right )-112\,\sin \left (4\,e+4\,f\,x\right )-12\,\sin \left (6\,e+6\,f\,x\right )\right )}{960\,f\,\left (\cos \left (2\,e+2\,f\,x\right )+1\right )} \]

[In]

int(cos(e + f*x)^2*(a + a*sin(e + f*x))^(5/2)*(c - c*sin(e + f*x))^(3/2),x)

[Out]

-(a^2*c*(a*(sin(e + f*x) + 1))^(1/2)*(-c*(sin(e + f*x) - 1))^(1/2)*(75*cos(e + f*x) + 105*cos(3*e + 3*f*x) + 3
5*cos(5*e + 5*f*x) + 5*cos(7*e + 7*f*x) - 700*sin(2*e + 2*f*x) - 112*sin(4*e + 4*f*x) - 12*sin(6*e + 6*f*x)))/
(960*f*(cos(2*e + 2*f*x) + 1))